﻿/*  
 * Helix Engine
 * http://helixengine.codeplex.com/
 * 
 * Copyright (c) 2010 - 2011 Joe Hegarty
 *  
 * This source code is subject to the terms of the Microsoft Public License (Ms-PL). 
 *  
 * Redistribution and use in source and binary forms, with or without modification, 
 * is permitted provided that redistributions of the source code retain the above 
 * copyright notices and this file header. 
 * 
 * For details please see http://www.opensource.org/licenses/ms-pl.html 
 *  
 * All other rights reserved. 
 *
 */  


using System.Windows.Media.Imaging;

using HelixEngine.Maths;

namespace HelixEngine.Render
{
    /// <summary>
    /// 
    /// </summary>
    public class QueuedRender
    {
        int _zIndex;
        WriteableBitmap _writeableBitmap;
        Vector2 _destinationPosition;
        WriteableBitmapExtensions.BlendMode _blendMode;


        /// <summary>
        /// 
        /// </summary>
        public WriteableBitmapExtensions.BlendMode BlendMode
        {
            get { return _blendMode; }
        }

        /// <summary>
        /// 
        /// </summary>
        public int ZIndex
        {
            get { return _zIndex; }
        }

        /// <summary>
        /// 
        /// </summary>
        public WriteableBitmap WriteableBitmap
        {
            get
            {
                return _writeableBitmap;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public Vector2 Position
        {
            get
            {
                return _destinationPosition;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="zindex"></param>
        /// <param name="bitmap"></param>
        /// <param name="destPosition"></param>
        /// <param name="blendMode"></param>
        public QueuedRender(int zindex, WriteableBitmap bitmap, Vector2 destPosition, WriteableBitmapExtensions.BlendMode blendMode = WriteableBitmapExtensions.BlendMode.Alpha)
        {
            _zIndex = zindex;
            _writeableBitmap = bitmap;
            _destinationPosition = destPosition;
            _blendMode = blendMode;
        }
    }
}
